<%--
  Created by IntelliJ IDEA.
  User: PC
  Date: 2017/5/24
  Time: 22:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>学生个人就业信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" type="text/css" href="../../static/common/layui/css/layui.css" media="all">
    <link rel="stylesheet" type="text/css" href="../../static/common/global.css" media="all">
    <link rel="stylesheet" href="../../static/css/table.css">
    <script src="../../static/common/layui/layui.js"></script>
    <script src="../../static/common/vue.min.js"></script>
    <script src="../../static/js/layuiModulesEX/common.js"></script>
    <script src="../../static/common/axios.min.js"></script>
    <link rel="stylesheet" href="../../static/common/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="../../static/common/font-awesome/css/font-awesome.min.css">
    <script src="../../static/common/jquery/jquery-1.11.1.min.js"></script>
    <script src="../../static/common/bootstrap/js/bootstrap.min.js"></script>

</head>
<body>

<div style="margin:15px;" id="Vue" v-cloak>
    <div >
        <fieldset class="layui-elem-field">
            <legend><a href="#" id="reload" onclick="history.go(-1)"><i class="fa fa-1x fa-reply"></i></a>就业信息</legend>
            <div id="view_effective"></div>
            <div id="view_invalid"></div>
        </fieldset>
    </div>

</div>
<script>
    function GetQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);  //获取url中"?"符后的字符串并正则匹配
        var context = "";
        if (r != null)
            context = r[2];
        reg = null;
        r = null;
        return context == null || context == "" || context == "undefined" ? "" : context;
    }
//    alert(GetQueryString("id"));
    var userid = GetQueryString("id");
    var employmentInformation_effective = [];
    var employmentInformation_invalid = [];
    var company = [];
</script>

<script id="demo" type="text/html">
    <div class="panel-group" id="accordion">
        {{# layui.each(d,function(index,item){ }}
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">

                    {{# var id= "" ; }}
                    {{# if(item.employmentInfo.valid=="1"){ }}
                    {{# var valid = "有效";}}
                    {{# id= "#effective"+ index; }}
                    {{# }; }}
                    {{# if(item.employmentInfo.valid=="2"){ }}
                    {{# var valid = "无效";}}
                    {{# id= "#invalid"+ index; }}
                    {{# };}}

                    {{# document.getElementById(index);}}
                    <a data-toggle="collapse" data-parent="#accordion" href={{ id }}>{{item.orgInfo.fullname||"未记录名字"}}</a>
                    <span style="float:right">({{valid}})</span>
                </h4>
            </div>
            {{# if(valid === "无效"){ }}
            <div id="invalid{{index}}" class="panel-collapse collapse">
            {{# }; }}
            {{# if(valid === "有效"){ }}
            <div id="effective{{index}}" class="panel-collapse collapse in ">
            {{# }; }}
                <form class="panel-body layui-form">
                    <div class="layui-form-item" style="font-size: 18px">
                        <label class="layui-form-lable">单位全称</label>
                        <span>{{item.orgInfo.fullname}}</span>
                        <%--<input type="text" name="fullname" class="layui-input" value="{{item.orgInfo.fullname}}">--%>
                    </div>
                    <div class="layui-form-item" style="font-size: 18px">
                        <label class="layui-form-lable">单位简称</label>
                        <span>{{item.orgInfo.shortname}}</span>
                    </div>
                    <div class="layui-form-item" style="font-size: 18px">
                        <label class="layui-form-lable">单位地址</label>
                        <span>{{item.orgInfo.addr}}</span>
                    </div>
                    <div class="layui-form-item" style="font-size: 18px">
                        <label class="layui-form-lable">单位联系人</label>
                        <span>{{item.orgInfo.contactor}}</span>
                    </div>
                    <div class="layui-form-item" style="font-size: 18px">
                        <label class="layui-form-lable">联系电话</label>
                        <span>{{item.orgInfo.phone}}</span>
                    </div>
                    <div class="layui-form-item" style="font-size: 18px">
                        <label class="layui-form-lable">单位网址</label>
                        <a target="_blank" href="{{item.orgInfo.url}}">{{item.orgInfo.url}}</a>
                    </div>
                    <div class="layui-form-item" style="font-size: 18px">
                        <label class="layui-form-lable">三方协议签订日期</label>
                        <span>{{item.employmentInfo.signdate||" "}}</span>
                    </div>
                </form>
            </div>
        </div>
            {{# }); }}
    </div>
</script>
<script src="../../static/js/admin/employmentInfo.js"></script>
</body>
</html>
